package com.spark.incoicings.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.spark.invoicings.entity.Order;
import com.spark.invoicings.entity.PurchaseDetail;
import com.spark.invoicings.utils.Result;

import java.util.List;
import java.util.Map;

public interface OrderService extends IService<Order> {

    /**
     * 查询所有为待出库采购订单
     * @return
     */
    List<Order> selectOrderStatusAll();

    /**
     * 根据id获取采购订单
     * @param id
     * @return
     */
    Order selectOrderById(Integer id);

    /**
     * 查询所有采购订单
     * 分页
     * @param map
     * @return
     */
    List<Order> selectOrderAll(Map<String, Object> map);

    /**
     * 添加采购订单及采购明细
     * @param order
     * @return
     */
    Result addOrder(Order order);

    /**
     * 采购订单及采购订单明细根据id更新
     * @param order
     * @return
     */
    boolean updateOrderById(Order order);

}
